package com.learn.hibernatevalidator.chapter05.groupinheritance;

import jakarta.validation.constraints.AssertTrue;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author: liyf
 * @create: 2025-01-05 21:39
 **/
@EqualsAndHashCode(callSuper = true)
@Data
public class SuperCar extends Car {

    @AssertTrue(
            message = "Race car must have a safety belt",
            groups = RaceCarChecks.class
    )
    private boolean safetyBelt;

    public SuperCar(String manufacturer, String licencePlate, int seatCount) {
        super(manufacturer, licencePlate, seatCount);
    }
}
